const express = require('express');
import userRouter from './user';
import searchRouter from './search';

// express有提供一个顶级的路由模块。直接使用
const router = express.Router();

router.use('/api', userRouter);
router.use('/api', searchRouter);

router.use('***', (req: any, resp: any) => {
  resp.status(404)
  resp.json({ msg: '没有对应的url' })
})

export default router